#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_update.py
# author:wmf
# datetime:2021/5/23 20:14
# software: PyCharm
'''
this is function description
'''
# import module your need
from homework10.homework10_2 import db


def dbUpdate(sql):
    cursor = db.cursor()
    try:
        cursor.execute(sql)
        db.commit()
        print("修改成功!")
        db.close()
    except:
        db.rollback()
        db.close()


if __name__ == "__main__":
    dbUpdate(sql='update test.student set age = 19 where name = "张三"')
